$(function() {
	init();


});
var str = location.search;
str = str.slice(1).split('&');
var json = {};
for (var i = 0; i < str.length; i++) {
    var a = str[i].split('=');
    json[a[0]] = a[1];
}
console.log(json);
function init() {
	$.ajax({
		type:"post",
		url:"http://192.168.59.3:8082/console/projectmgt/attendance/detail",
		dataType:"json",
		 data:JSON.stringify({
        	"pageNum": 1,
            "pageSize": 10,
            "relationId": json.relationId,
            "userCode": json.userCode
        }),
		contentType:"application/json",
		success:function  (data) {
			console.log(data);
				$("#table-fundManage").bootstrapTable({
       
        
		data:data.data.list,
		onClickCell:function (field, value, row, $element) {
           if (field == "process"){
               layer.open({
                   type: 2,
                   maxmin: true,
                   shadeClose: true,
                   area: ['100%', '100%'],
                   content: `demoAdition.html?teamId=${json.teamId}`
               });

		   }
        },
		onLoadSuccess: function(data) {
			console.log(data);

			
		}
	});
		},
	error:function (err) {
			console.log(err);
		}
	});

	
	
	
}
function process(val, row, index) {
    console.log(row);
    return "<span>编辑</span>" + "<span class='editorWorker' >></span>";

}

function resHandler(response) {
	console.log(response);
	var needData = {
		rows: response.data.list,
		total: response.total
	};
	return needData;
}